// --------------------------------------------------------------------------- // • DoHelpMenuCommand // --------------------------------------------------------------------------- // Launches specified URL and checks for errors. // void CQPictApp::DoHelpMenuCommand(CommandT inCommand) { if(inCommand == cmd_AboutHelpMenu) { LDialogBox* theDialog = (LDialogBox *) LWindow::CreateWindow(WIND_AboutHelp, this); //LCaption* regName = (LCaption*)theDialog->FindPaneByID(2011); //LCaption* regCompany = (LCaption*)theDialog->FindPaneByID(2016); theDialog->Show(); } else { //LStr255 url(STRx_HelpLocalURLStrings, inCommand); LStr255 url(STRx_HelpExtURLStrings, inCommand); if(url != "\p") { ICError err = mIC->DoURL(url); if(err != noErr) gError.ModalAlert(err, stop, 26); } } // Str255 url; // ::GetIndString(url, STRx_HelpMenuURLStrings, strIndex); //STRx_HelpExtURLStrings // ICError err = mIC->DoURL(url); // if(err != noErr) // gError.ModalAlert(err, stop, 26); } // --------------------------------------------------------------------------- // • SendSelfAEOpenDoc - static // --------------------------------------------------------------------------- // Self-send an AppleEvent to open a document. // void CQPictApp::SendSelfAEOpenDoc(FSSpec &inFileSpec) { Try_ { AppleEvent openEvent; UAppleEventsMgr::MakeAppleEvent(kCoreEventClass, kAEOpen, openEvent); OSErr err = ::AEPutParamPtr(&openEvent, keyDirectObject, typeFSS, &inFileSpec, sizeof(FSSpec)); ThrowIfOSErr_(err); UAppleEventsMgr::SendAppleEvent(openEvent); } Catch_(inErr) { // Ignore it. } EndCatch_ }